import type { R, TableDataInfo } from '@/api/model/resultModel';
import type { KesheXyForm, KesheXyQuery, KesheXyVo } from '@/api/keshe/model/xyModel';
import { request } from '@/utils/request';

// 查询迷宫坐标列表
export function listXy(query?: KesheXyQuery) {
  return request.get<TableDataInfo<KesheXyVo>>({
    url: '/keshe/xy/list',
    params: query,
  });
}

// 查询迷宫坐标详细
export function getXy(id: number) {
  return request.get<R<KesheXyVo>>({
    url: `/keshe/xy/${id}`,
  });
}

// 新增迷宫坐标
export function addXy(data: KesheXyForm) {
  return request.post<R<void>>({
    url: '/keshe/xy',
    data,
  });
}

// 修改迷宫坐标
export function updateXy(data: KesheXyForm) {
  return request.put<R<void>>({
    url: '/keshe/xy',
    data,
  });
}

// 删除迷宫坐标
export function delXy(ids: number | Array<number>) {
  return request.delete<R<void>>({
    url: `/keshe/xy/${ids}`,
  });
}
